import React, { PureComponent } from 'react';
import { Button } from 'antd-mobile';
import {connect} from "dva"
import {routerRedux} from "dva/router"
import "./index.less";
class Error extends PureComponent{
	render(){
		let {dispatch}=this.props;
		return (
			<div className="errorBox">
				<div className="img">
					<img src="https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg" alt="" />
				</div>
				<div className="content">
					<h1>404</h1>
					<p>抱歉，你访问的页面不存在</p>
					<Button type="primary" size="default" style={{width:"60%",margin:"0 auto"}}
						onClick={() =>{
							dispatch(routerRedux.go(-1))
						}}
					>返回上页</Button>
				</div>
			</div>
		);
	}
}
function mapStateToProps(){
	return {};
}

export default connect(mapStateToProps)(Error);